<%@ page import="les.Usuario" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'usuario.label', default: 'Usuario')}" />
        <title>Alterar Senha</title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
        </div>
        <div class="body">
            <h1>Alterar senha</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${usuarioInstance}">
            <div class="errors">
                <g:renderErrors bean="${usuarioInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post" >
                <g:hiddenField name="id" value="${usuarioInstance?.id}" />
                <g:hiddenField name="version" value="${usuarioInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                       
                             <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="senha_atual"><g:message code="usuario.senha_atual.label" default="Senha Atual" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: usuarioInstance, field: 'senha_atual', 'errors')}">
                                    <g:passwordField name="senha_atual" value="" />
                                    <g:hiddenField name="senha_atual_no_banco" value="${usuarioInstance?.senha}" />
                                </td>
                            </tr>
                            
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="senha_nova"><g:message code="usuario.senha_nova.label" default="Nova Senha" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: usuarioInstance, field: 'senha_nova', 'errors')}">
                                    <g:passwordField name="senha_nova" value="" />
                                </td>
                            </tr>
                            
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="confirmar_senha"><g:message code="usuario.confirmar_senha.label" default="Confirmar Nova Senha" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: usuarioInstance, field: 'confirmar_senha', 'errors')}">
                                    <g:passwordField name="confirmar_senha" value="" />
                                </td>
                            </tr>
                            
                           
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="alterar_senha" action="alterar_senha" value="Alterar" id="alterar"/></span>
                </div>
            </g:form>
        </div>
    </body>
</html>